package cn.shop.dys.widget;

import android.content.Context;
import android.view.animation.Interpolator;
import android.widget.Scroller;

/**
 * 不能右滑scroller
 * Created by sunjian on 2016/4/17.
 */
public class NoRightScroller extends Scroller{
    private int mDuration=0;
    public NoRightScroller(Context context) {
        super(context);
    }

    public NoRightScroller(Context context, Interpolator interpolator) {
        super(context, interpolator);
    }

    public NoRightScroller(Context context, Interpolator interpolator, boolean flywheel) {
        super(context, interpolator, flywheel);
    }

    @Override
    public void startScroll(int startX, int startY, int dx, int dy) {
        /*if(dx>0){
            super.startScroll(startX, startY, dx, dy,mDuration);
            return;
        }*/
        super.startScroll(startX, startY, dx, dy,mDuration);
    }

    @Override
    public void startScroll(int startX, int startY, int dx, int dy, int duration) {
        /*if(dx>0){
            super.startScroll(startX, startY, dx, dy,mDuration);
            return;
        }*/
        super.startScroll(startX, startY, dx, dy, mDuration);
    }
}
